/**
 * 报表设计公司(2011)
 */
package com.reportgear.report.core.cell.attr;

import com.reportgear.report.model.auxiliary.ColumnRow;

/**
 * 单元格扩展属性
 * 
 * @version 1.0 2011-3-27
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class CellExpandAttr {
	/**
	 * 默认单元格编辑属性
	 */
	public static final CellExpandAttr	DEF_CELL_EXPAND_ATTR	= new CellExpandAttr();

	/**
	 * 扩展类型
	 */
	public enum ExtendType {
		/**
		 * 不可扩展
		 */
		None,
		/**
		 * 垂直可扩展
		 */
		Vertical,
		/**
		 * 水平可扩展
		 */
		Horizental,
		/**
		 * 双向可扩展
		 */
		Both
	}

	/**
	 * 扩展方向
	 */
	public enum ExpandDirection {
		/**
		 * 不扩展
		 */
		None,
		/**
		 * 从上往下扩展
		 */
		UpToDown,
		/**
		 * 从左往右扩展
		 */
		LeftToRight
	}

	public enum ConditionTransforDirection {
		/**
		 * 不传递
		 */
		None,
		/**
		 * 从上往下
		 */
		UpToDown,
		/**
		 * 从左到右
		 */
		LeftToRight
	}

	/**
	 * 扩展类型
	 */
	private ExtendType					extendType			= ExtendType.None;
	/**
	 * 扩展方向
	 */
	private ExpandDirection				expandDirection		= ExpandDirection.None;
	/**
	 * 条件传递方向
	 */
	private ConditionTransforDirection	condTransDirection	= ConditionTransforDirection.None;
	/**
	 * 左父格默认
	 */
	private boolean						leftParentDefault	= true;
	/**
	 * 上父格默认
	 */
	private boolean						upParentDefault		= true;
	/**
	 * 左父格
	 */
	private ColumnRow					leftParentColumnRow	= null;
	/**
	 * 上父格
	 */
	private ColumnRow					upParentColumnRow	= null;

	public void setLeftParentColumnRow(ColumnRow leftParentColumnRow) {
		this.leftParentColumnRow = leftParentColumnRow;
	}

	public ColumnRow getLeftParentColumnRow() {
		return leftParentColumnRow;
	}

	public void setUpParentColumnRow(ColumnRow upParentColumnRow) {
		this.upParentColumnRow = upParentColumnRow;
	}

	public ColumnRow getUpParentColumnRow() {
		return upParentColumnRow;
	}

	public void setUpParentDefault(boolean upParentDefault) {
		this.upParentDefault = upParentDefault;
	}

	public boolean isUpParentDefault() {
		return upParentDefault;
	}

	public void setLeftParentDefault(boolean leftParentDefault) {
		this.leftParentDefault = leftParentDefault;
	}

	public boolean isLeftParentDefault() {
		return leftParentDefault;
	}

	public void setExtendType(ExtendType extendType) {
		this.extendType = extendType;
	}

	public ExtendType getExtendType() {
		return extendType;
	}

	public void setExpandDirection(ExpandDirection expandDirection) {
		this.expandDirection = expandDirection;
	}

	public ExpandDirection getExpandDirection() {
		return expandDirection;
	}

	public void setConditionTransDirection(ConditionTransforDirection condTransDirection) {
		this.condTransDirection = condTransDirection;
	}

	public ConditionTransforDirection getConditionTransDirection() {
		return condTransDirection;
	}
}
